View Javadoc
1 /* 2 * Title: S/MIME Project 3 * Description: S/MIME email sending capabilities 4 * @Author Vladimir Radisic 5 * @Version 2.0.1 6 */ 7 8 9 package org.webdocwf.util.smime.cms; 10 11 12 import org.webdocwf.util.smime.exception.SMIMEException; 13 import org.webdocwf.util.smime.der.DERObjectIdentifier; 14 15 16 /*** 17 * ContentTypeIdentifier class is DER encoded Content Type Identifier represented in 18 * ASN.1 notation according to RFC2630.<BR> 19 * <BR> 20 * ContentType ::= OBJECT IDENTIFIER<BR> 21 */ 22 public class ContentTypeIdentifier extends DERObjectIdentifier { 23 24 /*** 25 * This constructor has two different forms, depend on parameter typeConstruction0, 26 * which can be: DOT_SEPARATED_ARRAY or NAME_STRING. If typeConstruction0 parameter 27 * is DOT_SEPARATED_ARRAY then id0 definition is represented by numbers separated 28 * with dots (example: "1.2.840.113549.1.7.1"). In case of NAME_STRING, id0 29 * definition is name of object identifier for content attribute (example: "ID_DATA"). 30 * @param id0 defines Object Identifier in representation determined by second 31 * parameter - typeConstruction0. 32 * @param typeOfAttribute0 can take values DOT_SEPARATED_ARRAY and NAME_STRING 33 * @exception SMIMEException if wrong type of parameters are passed to the 34 * constructor. Also, it can be thrown from super class constructor. 35 */ 36 public ContentTypeIdentifier(String id0, String typeConstruction0) throws SMIMEException { 37 super(id0, typeConstruction0); // Finding apropriate identifier 38 } 39 40 /*** 41 * Array of numbers is used for construction of desired attribute DER Object 42 * Identifier. All numbers in the array represent one number between dots in 43 * object identifier string. 44 * @param arrayID0 array of given numbers (example: for ID_DATA attributes, 45 * numbers are 1, 2, 840, 113549, 1, 7 and 1) 46 * @exception SMIMEException if wrong type of parameters are passed to the 47 * constructor. Also, it can be thrown from super class constructor. 48 */ 49 public ContentTypeIdentifier(int[] arrayID0) throws SMIMEException { 50 super(arrayID0); // Finding apropriate identifier 51 } 52 } 53

This page was automatically generated by Maven